package com.pinyoumei.app.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.pinyoumei.app.R;
import com.pinyoumei.app.bean.FirstBean;
import com.pinyoumei.app.bean.ShopCartListBean;

import java.util.List;

public class ShoppingCartAdapter extends BaseQuickAdapter<ShopCartListBean.ShopCartListDto, BaseViewHolder> {


    public ShoppingCartAdapter(int layoutResId, @Nullable List<ShopCartListBean.ShopCartListDto> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShopCartListBean.ShopCartListDto item) {
        helper.setChecked(R.id.sci_box,item.isSelect());
        ImageView sci_img = helper.getView(R.id.sci_img);
        Glide.with(mContext).load(item.getGoods_img()).into(sci_img);
        helper.setText(R.id.sci_title,item.getGoods_name());
        helper.setText(R.id.sci_money,item.getMarket_price());
        helper.setText(R.id.sci_num,item.getSale_num());
    }

}
